1. Field of the Invention
The present invention relates to a memory device and a control method thereof and, more particularly, to a memory device having a nonvolatile semiconductor memory and a control method thereof.
2. Description of the Related Art
Memory cards including a flash memory that is as a kind of nonvolatile semiconductor memory are used as music data or video data recording media. As the file system of the memory card, for example, a file allocation table (FAT) file system is used. The FAT file system assumes a medium capable of high-speed random rewriting such as a hard disk. In random writing, data is written at random in a free sector independently of the addresses of sectors (units of write areas recognized by the file system).
A typical example of a flash memory used in a memory card is a NAND flash memory. A NAND flash memory can erase data only in blocks. One block includes a plurality of write units, i.e., pages. To rewrite only part of data recorded in a block, it is necessary to write new data to rewrite old data in a new erased block and copy non-rewritten data from the old block containing the old data (data to be rewritten to the new data) to the new block. This process is called a “move-write (collateral copy)”. The move-write is done by copying non-rewritten data. Hence, frequent occurrence of a move-write greatly increases the overhead.
In the FAT file system, FAT data is rewritten every time file cluster data is rewritten. For this reason, if the FAT file system is employed as a file system to manage a NAND flash memory, a move-write occurs every time cluster data is rewritten, resulting in lower file rewrite speed.
An associated technique is disclosed, which efficiency manages data stored a block-erase-type flash memory (Jpn. Pat. Appln. KOKAI Publication No. 11-143764).